package com.hnkywl.sts.entity.sys;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.organ.Gsjg;
import com.hnkywl.sts.entity.sfgl.Sfk;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.Date;

/**
 * 菜单
 * Created with IntelliJ IDEA.
 * User: jerry
 * Date: 13-3-3
 * Time: 下午10:22
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "T_SYS_ZDJ")
public class Zdj extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqZdj", allocationSize = 1, sequenceName = "SEQ_SYS_ZDJ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqZdj")
    private Long id;

    //品名
   @ManyToOne(fetch = FetchType.LAZY)
   @JoinColumn(name = "PM_ID")
   @NotFound(action = NotFoundAction.IGNORE)
   private Pm pm;

    //指导价
    private Double zdj;

    //导入日期
    private Date drrq;

    //卖家
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "MJ_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Gsjg mj;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Pm getPm() {
        return pm;
    }

    public void setPm(Pm pm) {
        this.pm = pm;
    }

    public Double getZdj() {
        return zdj;
    }

    public void setZdj(Double zdj) {
        this.zdj = zdj;
    }

    public Date getDrrq() {
        return drrq;
    }

    public void setDrrq(Date drrq) {
        this.drrq = drrq;
    }

    public Gsjg getMj() {
        return mj;
    }

    public void setMj(Gsjg mj) {
        this.mj = mj;
    }
}
